﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuanLyDoanVien.Bussiness;
using QuanLyDoanVien.DataLayer;
using DevComponents.DotNetBar.Controls;
using System.Windows.Forms;

namespace QuanLyDoanVien.Controller
{
    class LopCtrl
    {
        LopData m_LopData = new LopData();
        LopInfo m_LopInfo = new LopInfo();
        public List<LopInfo> Lay_DSLop()
        {
            return m_LopData.lay_DSLop();
        }
        public void HienThiComboBox(ComboBoxEx cbx)
        {
            cbx.DataSource = m_LopData.lay_DSLop();
            cbx.DisplayMember = "TenLop";
            cbx.ValueMember = "MaLop";
        }

        #region Them

        public void LuuLop(LopInfo lop)
        {
           
            m_LopData.LuuLop(lop);
        }
        #endregion

        #region sua
        public bool SuaLop(LopInfo lop)
        {
            return m_LopData.SuaLop(lop);
        }
        #endregion

        #region xoa
        public bool XoaLop(String malop)
        {
            return m_LopData.XoaLop(malop);
        }
        #endregion

        public String getAutoID()
        {
            return m_LopData.getAutoID();
        }
    }
}
